#include "SceneNode.h"

#include <cassert>

//To samo co w SceneNode.h


/*
void CSceneNode::attachChild(Ptr child)	{
	child->mParent = this;
	mChildren.push_back(std::move(child));
}

CSceneNode::Ptr CSceneNode::detachChild(const CSceneNode& node)
{
	auto found  =std::find_if(mChildren.begin(), mChildren.end(), 
		[&](Ptr &p) -> bool { return p.get() == &node; });
	assert(found != mChildren.end());
	Ptr result = std::move(*found);
	result->mParent = nullptr;
	mChildren.erase(found);
	return result;
}
*/
void CSceneNode::draw(sf::RenderTarget& target,sf::RenderStates states) const {
	states.transform*=getTransform();
	drawCurrent(target, states);

	//for(const Ptr& child : mChildren)
	//	child->draw(target, states);
}

void  CSceneNode::drawCurrent(sf::RenderTarget& target,sf::RenderStates states) const {

}